<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>设置全文查询的匹配模式</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sphinxclient.setlimits.html">SphinxClient::setLimits</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="sphinxclient.setmaxquerytime.html">SphinxClient::setMaxQueryTime</a></div>
 <div class="up"><a href="class.sphinxclient.html">SphinxClient</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="sphinxclient.setmatchmode" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">SphinxClient::setMatchMode</h1>
  <p class="verinfo">(PECL sphinx &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">SphinxClient::setMatchMode</span> &mdash; <span class="dc-title">设置全文查询的匹配模式</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-sphinxclient.setmatchmode-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="type">bool</span> <span class="methodname"><strong>SphinxClient::setMatchMode</strong></span>
    ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$mode</code></span>
   )</div>

  <p class="para rdfs-comment">
   设置全文查询的匹配模式. <em><code class="parameter">mode</code></em> 是以下列出的常量之一.
   <table class="doctable table">
    <caption><strong>匹配模式</strong></caption>
    
     <thead>
      <tr>
       <th>Constant</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>SPH_MATCH_ALL</td>
       <td>匹配所有查询词（默认模式）.</td>
      </tr>

      <tr>
       <td>SPH_MATCH_ANY</td>
       <td>匹配查询词中的任意一个.</td>
      </tr>

      <tr>
       <td>SPH_MATCH_PHRASE</td>
       <td>将整个查询看作一个词组，要求按顺序完整匹配.</td>
      </tr>

      <tr>
       <td>SPH_MATCH_BOOLEAN</td>
       <td>将查询看作一个布尔表达式.</td>
      </tr>

      <tr>
       <td>SPH_MATCH_EXTENDED</td>
       <td>将查询看作一个Sphinx内部查询语言的表达式.</td>
      </tr>

      <tr>
       <td>SPH_MATCH_FULLSCAN</td>
       <td>使用完全扫描，忽略查询词汇.</td>
      </tr>

      <tr>
       <td>SPH_MATCH_EXTENDED2</td>
       <td>类似 <strong><code>SPH_MATCH_EXTENDED</code></strong> ，并支持评分和权重.</td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-sphinxclient.setmatchmode-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<em><code class="parameter">mode</code></em></dt>

     <dd>

      <p class="para">
       匹配模式.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-sphinxclient.setmatchmode-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-sphinxclient.setmatchmode-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><a href="sphinxclient.setrankingmode.html" class="xref">SphinxClient::setRankingMode</a></li>
    <li class="member"><a href="sphinxclient.setsortmode.html" class="xref">SphinxClient::setSortMode</a></li>
   </ul>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sphinxclient.setlimits.html">SphinxClient::setLimits</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="sphinxclient.setmaxquerytime.html">SphinxClient::setMaxQueryTime</a></div>
 <div class="up"><a href="class.sphinxclient.html">SphinxClient</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
